package com.xhh.microfin.dispatch.service.process;

import com.xhh.microfin.dispatch.model.entity.ProcessInstance;
import com.xhh.microfin.dispatch.model.entity.Task;
import com.xhh.microfin.dispatch.service.process.impl.ProcessContext;
import com.xhh.microfin.dispatch.service.process.impl.Var;

import javax.annotation.processing.ProcessingEnvironment;
import java.util.List;
import java.util.Map;

/**
 * @Author: 003035
 * @Date: 2019/1/16
 */
public interface IProcess {

    /**
     * 开始流程
     * @param procssCode
     * @return
     */
    ProcessInstance startProcess(String procssCode,String businessId);

    ProcessInstance process(ProcessInstance processInstance);

    List<Var> getProcessVar(Integer processId);

    List<Var> getTaskVar(Integer taskId);

    ProcessInstance getProcessInstanceByBusId(String businessId);

    ProcessContext prepareProcessContext(Task task);

    boolean addProcessVar(ProcessContext context, Var var);

    boolean addTaskVar(ProcessContext context, Var var);

    boolean addTaskVar(Task task,Var var);

    List<Task> getTaskByProcessInstanceIdAndTaskCode(Integer processInstanceId,String taskCode);
}
